package Eyjafjalla.card.dolly;

import Eyjafjalla.action.DrawCloudAction;
import Eyjafjalla.action.GoodFriendAction;
import Eyjafjalla.action.InDamageAfterDrawAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.modcore.ColorEnum;
import com.megacrit.cardcrawl.actions.common.DrawCardAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;

public class HPY_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "HPY_Eyjafjalla";
    private static final CardStrings cardStrings;

    public HPY_Eyjafjalla(){
        super(ID, cardStrings.NAME,-2,cardStrings.DESCRIPTION,CardType.STATUS, ColorEnum.Eyjafjalla_Dolly_COLOR,CardRarity.UNCOMMON,CardTarget.NONE);
        setDolly();
        this.baseMagicNumber = 1;
        this.magicNumber = 1;
    }

    @Override
    public AbstractCard makeCopy() {
        return new HPY_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {

    }

    @Override
    public void triggerOnExhaust() {
        super.triggerOnExhaust();
        addToBot(new DrawCardAction(this.magicNumber));
        addToBot(new GoodFriendAction(false,2));
    }

    @Override
    public void triggerOnGlowCheck() {
        this.glowColor = AbstractCard.BLUE_BORDER_GLOW_COLOR.cpy();
    }

    @Override
    public boolean canUpgrade() {
        return !this.upgraded;
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeMagicNumber(1);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}

